package zxr.demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import zxr.Userservice;

public class testspring3 {

    public static void main(String[] args){
        //加载配置文件
        ApplicationContext context =new ClassPathXmlApplicationContext("bean3.xml");
        //获取配置创建的对象
        Userservice userservice = context.getBean("userservice", Userservice.class);

        System.out.println("==============");
        userservice.out();
        System.out.println("==============");
    }
}
